<%@ page language="java" import="java.util.*,com.jiankang.entity.*,com.jiankang.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
     <link href="<%=basePath%>/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=basePath%>/js/jquery.js"></script>
<script language="javascript">
$(function(){	
	//导航切换
	$(".imglist li").click(function(){
		$(".imglist li.selected").removeClass("selected")
		$(this).addClass("selected");
	})	
})	
</script>
<script type="text/javascript">
$(document).ready(function(){
  $(".click").click(function(){
  $(".tip").fadeIn(200);
  });
  
  $(".tiptop a").click(function(){
  $(".tip").fadeOut(200);
});

  $(".sure").click(function(){
  $(".tip").fadeOut(100);
});

  $(".cancel").click(function(){
  $(".tip").fadeOut(100);
});

});
</script>
</head>


<body>
<c:if test="${empty currentUser}">
<jsp:include page="404.jsp"/>
</c:if>
<c:if test="${!empty currentUser}">

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="">首页</a></li>
    <li><a href="">图片列表</a></li>
    </ul>
    </div>
    <div class="rightinfo">
     <div class="tools">
    	<ul class="toolbar">
        <li>
        <span>
       		 <img src="<%=request.getContextPath() %>/images/t01.png" />
        </span>
        	<a href="<%=basePath%>mountinformation/addproductjump">添加</a>
        </li>
       
        </ul>
    </div>
    <table class="imgtable">
    <thead>
    <tr>
    <th width=70px;>编号</th>
    <th width="100px;">缩略图</th>
    <th>标题</th>
    <th width="150px;" style="text-align: left;">价格</th>
    <th width="70px;" style="text-align: left;">点击</th>
    <th width="100px;" style="text-align: left;">编辑</th>
    </tr>
    </thead>
    
    <tbody>
    	<c:forEach items="${product}" var="pro" varStatus="s">
    <tr>
    <td style="text-align: center;">${pro.id}</td>
    <td class="imgtd"><img src="<%=Data.URL.base%>${pro.images}" width="56px" height="56px"></td>
    <td><a href="#">${pro.title }</a><p>发布时间：<fmt:formatDate value="${pro.time}" type="date" pattern="yyyy-MM-dd HH:mm:ss"/></p></td>
    <td style="text-align: left;">${pro.price}￥</td>
    <td>${pro.click}</td>
     <td style="text-align: left;"><a href="<%=basePath%>mountinformation/productmodification/${pro.id}">修改</a>
     ||<a href="<%=basePath%>mountinformation/productdelete/${pro.id}">删除</a></td>
    </tr>
    </c:forEach>
    </tbody>
    </table>
   <div class="pagin">
    	<div class="message">共<i class="blue">${page.totalPageCount}</i>页，当前显示第&nbsp;<i class="blue">${page.pageNow}&nbsp;</i>页</div>
        <ul class="paginList">
          <li class="paginItem"><a href="<%=basePath%>mountinformation/selectproduct?pageNow=1">首页</a></li>
        <c:choose>
        <c:when test="${page.pageNow - 1 > 0}">
       <li class="paginItem"> <a href="<%=basePath%>mountinformation/selectproduct?pageNow=${page.pageNow - 1}"></a><span class="pagepre"></span></li>
       
        </c:when>
        <c:when test="${page.pageNow - 1 <= 0}">
		  <li class="paginItem"><a href="<%=basePath%>mountinformation/selectproduct?pageNow=1"></a><span class="pagepre"></span></li>
		</c:when>
        </c:choose>
        <c:choose>
		<c:when test="${page.pageNow + 1 < page.totalPageCount}">
		 <li class="paginItem">	<a href="<%=basePath%>mountinformation/selectproduct?pageNow=${page.pageNow + 1}"></a><span class="pagenxt"></span></li>
		</c:when>
		<c:when test="${page.pageNow + 1 >= page.totalPageCount}">
		 <li class="paginItem">	<a href="<%=basePath%>mountinformation/selectproduct?pageNow=${page.totalPageCount}"></a><span class="pagenxt"></span></li>
		</c:when>
	</c:choose>
                <li class="paginItem"><a href="<%=basePath%>mountinformation/selectproduct?pageNow=${page.totalPageCount}">尾页</a></li> 
        </ul>
    </div>
    
    
    <div class="tip">
    	<div class="tiptop"><span>提示信息</span><a></a></div>
        
      <div class="tipinfo">
        <span><img src="<%=request.getContextPath() %>/images/ticon.png" /></span>
        <div class="tipright">
        <p>是否确认对信息的修改 ？</p>
        <cite>如果是请点击确定按钮 ，否则请点取消。</cite>
        </div>
        </div>
        
        <div class="tipbtn">
        <input name="" type="button"  class="sure" value="确定" />&nbsp;
        <input name="" type="button"  class="cancel" value="取消" />
        </div>
    
    </div>
    
    
    
    
    </div>
    
    <div class="tip">
    	<div class="tiptop"><span>提示信息</span><a></a></div>
        
      <div class="tipinfo">
        <span><img src="<%=request.getContextPath() %>/images/ticon.png" /></span>
        <div class="tipright">
        <p>是否确认对信息的修改 ？</p>
        <cite>如果是请点击确定按钮 ，否则请点取消。</cite>
        </div>
        </div>
        
        <div class="tipbtn">
        <input name="" type="button"  class="sure" value="确定" />&nbsp;
        <input name="" type="button"  class="cancel" value="取消" />
        </div>
    
    </div>
    </c:if>
<script type="text/javascript">
	$('.imgtable tbody tr:odd').addClass('odd');
	</script>
  </body>
</html>
